<template>
    <div >
        <van-cell-group v-for="item in goodsData">
            <router-link :to="'/detail/'+item.goods_id">
                  <van-cell :title="item.goods_name" value="内容" />
            </router-link>

</van-cell-group>

    </div>
</template>

<script setup>
import { ref } from 'vue'
import { useRoute, useRouter} from 'vue-router'
const route=new useRoute()
const router=new useRouter()

import { GoodsApi} from '@/api/api'
const goodsData=ref([])
GoodsApi().then((res) => {
    console.log(res);
   
        goodsData.value=res.data.message.goods
    
})
</script>

<style lang="scss" scoped>

</style>